
/*
 * (C)opyright 2010, Alessandro Agosto. All rights reserved.
 * This file is part of the "pycoev" project.
 * To get more informations about the license read the LICENSE file.
 *
 * PRIVATE: included by pyc_pyapis.h
 * Includes the py3k support.
 * Actually EXPERIMENTAL (need to be tested)
 * NOTE: actually this is untested code.
 */


#pragma once
#ifndef _PYC_PY3KSUPPORT_H
#define _PYC_PY3KSUPPORT_H


#ifdef PYC_PY_3K


#   ifdef PYC_MODULE_REQUIRED /*declared only in pycoev.c*/
    static PyModuleDef pycoev_module = {
        PyModuleDef_HEAD_INIT,
        "pycoev",
        pyc_module_doc,
        -1,
        pycoev_methods,
    };
#   endif /* PYC_MODULE_REQUIRED */


#   define Pyc_InitFunc PyInit_pycoev
#   define Pyc_ModInit() PyModule_Create(&pycoev_module)


#else /* !(PYTHON_MAJOR_VERSION >= 3) */


#   define Pyc_InitFunc initpycoev
#   define Pyc_ModInit() Py_InitModule3("pycoev",\
                                        pycoev_methods,\
                                        pyc_module_doc);


#endif /* PYC_PY_3K */


#endif /* _PYC_PY3KSUPPORT_H */
